home *** CD-ROM | disk | FTP | other *** search
- #include "QD3DtoQTVR.h"
- #include "extern.h"
- #include "object.h"
- #include "draw.h"
-
- void MyRotateObjectX(DocumentPtr theDocument,float angle)
- {
- TQ3Matrix4x4 tempMatrix;
-
- Q3Matrix4x4_SetTranslate(&tempMatrix,-theDocument->documentGroupCenter.x,
- -theDocument->documentGroupCenter.y,-theDocument->documentGroupCenter.z);
- Q3Matrix4x4_Multiply(&theDocument->modelRotation, &tempMatrix, &theDocument->modelRotation);
-
- Q3Matrix4x4_SetRotate_XYZ(&tempMatrix, angle, 0.0, 0.0);
- Q3Matrix4x4_Multiply(&theDocument->modelRotation, &tempMatrix, &theDocument->modelRotation);
-
- Q3Matrix4x4_SetTranslate(&tempMatrix,theDocument->documentGroupCenter.x,
- theDocument->documentGroupCenter.y,theDocument->documentGroupCenter.z);
- Q3Matrix4x4_Multiply(&theDocument->modelRotation, &tempMatrix, &theDocument->modelRotation);
- }
-
- void MyRotateObjectY(DocumentPtr theDocument,float angle)
- {
- TQ3Matrix4x4 tempMatrix;
-
- Q3Matrix4x4_SetTranslate(&tempMatrix,-theDocument->documentGroupCenter.x,
- -theDocument->documentGroupCenter.y,-theDocument->documentGroupCenter.z);
- Q3Matrix4x4_Multiply(&theDocument->modelRotation, &tempMatrix, &theDocument->modelRotation);
-
- Q3Matrix4x4_SetRotate_XYZ(&tempMatrix, 0.0, angle, 0.0);
- Q3Matrix4x4_Multiply(&theDocument->modelRotation, &tempMatrix, &theDocument->modelRotation);
-
- Q3Matrix4x4_SetTranslate(&tempMatrix,theDocument->documentGroupCenter.x,
- theDocument->documentGroupCenter.y,theDocument->documentGroupCenter.z);
- Q3Matrix4x4_Multiply(&theDocument->modelRotation, &tempMatrix, &theDocument->modelRotation);
- }
-
-
-